package com.cupster.func_db_dbflow.db_main.table;

import com.cupster.func_db_dbflow.db_main.AppDB;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;

@Table(database = AppDB.class)
public class User extends BaseModel {
// @Table：在指定的数据库，根据类名自动生成一张表
// @PrimaryKey、//主键
// @Column、//表的列项
// @Unique、:唯一的
// @ForeignKey:外键

    @PrimaryKey(autoincrement = true)
    @Column
    public long id;

    @Column
    public String name;

    @Column
    public String account;

    @Column
    public String pwd;

    @Column(defaultValue = "0")
    public int age;

    @Column
    public double money;


}
